<{*换购专区*}>
<{include file="top.html" }>
<link rel="stylesheet" type="text/css" href="<{$preStaticUrl}>Wap/css/score.css?v=<{$resVersion}>"/>
</head>
<body>
<div class="xy-panel">
    <div class="xy-panel-top">
        <div class="xy-titlebar">
            <div class="xy-titlebar-left">
                <a class="insertBefore_left_arrow_gray" href="javascript:void(0);"></a>
            </div>
            <div class="xy-titlebar-title"><{$title}></div>
            <div class="xy-titlebar-right"></div>
        </div>
    </div>
    <div class="xy-panel-content" style="bottom:5rem;">
        <div class="xy-row vDirectionRow">
            <dl class="illustrate illustrate-1"><img class="uhead" src="<{$preStaticUrl}>Wap/images/integration-1.png">我的积分：<{$userinfo.point}></dl>
            <ul class="wddh_list">
                <{foreach from = $listOnline item=item}>
                    <li class="wddh_box clearfix">
                        <a href="<{u('info/?id='|cat:$item['id'])}>">
                            <div class="nub_top">
                                <div class="graph"><span class="sec">换购</span></div>
                                <img src="<{$preUploadUrl}><{$item.listPic}>" />
                                <{if $item.stock == POINTMALL_NO_STACK}>
                                <dl class="over">已抢完</dl>
                                <{/if}>
                                <{if $item.restTime > 0 }>
                                <dl class="hint exchange-time" data-time="<{$item.restTime}>">距开始&nbsp;&nbsp;&nbsp;</dl>
                                <{else}>
                                <{* <dl class="hint" >活动已经开始</dl> *}>
                                <{/if}>
                            </div>
                            <ul>
                                <li><{$item.titleList}></li>
                                <li><{if $item.point}><i><{$item.point}></i>积分<{/if}><{if $item.nowPrice > 0}>＋<i><{$item.nowPrice}></i>元<{/if}></li>
                                <li>市场参考价：<{$item.originalPrice}>元</li>
                            </ul>
                        </a>
                    </li>
                <{/foreach}>
            </ul>
            <div class="formerly_box">
                <div class="formerly_topic"><span class="wqdh">往期兑换</span></div>
            </div>
            <ul class="wddh_list">
                <{foreach from = $listPast item=item}>
                    <li class="wddh_box clearfix">
                        <a href="<{u('info/?id='|cat:$item['id'])}>">
                            <div class="nub_top">
                                <div class="graph"><span class="sec">换购</span></div>
                                <img src="<{$preUploadUrl}><{$item.listPic}>" />
                                <dl class="hint">已经结束</dl>
                            </div>
                            <ul>
                                <li><{$item.titleList}></li>
                                <li><{if $item.point}><i><{$item.point}></i>积分<{/if}><{if $item.nowPrice > 0}>＋<i><{$item.nowPrice}></i>元<{/if}></li>
                                <li>市场参考价：<{$item.originalPrice}>元</li>
                            </ul>
                        </a>
                    </li>
                <{/foreach}>
            </ul>
        </div>
    </div>
</div>
<{include file="signBody.html"}>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {    
        setTimeout(function (){timeout();},1000);
        function timeout(){
            var $point_timeer = $('.exchange-time');
            $point_timeer.each(function() {
                var time = parseInt($(this).data("time"));
                if(time>0 && time){
                    output_time(time,this);
                }
                $(this).data("time",--time);
            });
            setTimeout(function (){timeout();},1000);
        }
        function output_time (time,obj) {
            var hour = Math.floor(time/60/60);
            var minute = Math.floor((time/60)%60);
            var scond = Math.floor(time%60);
            console.log('hour'+hour+'minute'+minute+'scond'+scond);
            if(hour<10){
                hour = '0' + hour;
            }
            if(minute<10){
                minute = '0' + minute;
            }
            if(scond<10){
                scond = '0' + scond;
            }
            $(obj).html("距开始&nbsp;&nbsp;&nbsp;"+hour+":"+minute+":"+scond);
        }
    });

</script>